'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});
exports.getPromiseValue = undefined;

var _isPromise = require('./isPromise');

var _getValue = require('./getValue');

var getPromiseValue = exports.getPromiseValue = function getPromiseValue(value, isReject) {
    if ((0, _isPromise.isPromise)(value)) {
        return value;
    }
    var _value = (0, _getValue.getValue)(value);
    return Promise[isReject ? 'reject' : 'resolve'](_value);
};
exports.default = getPromiseValue;